Newcastle United are into the fourth round of the FA Cup for the first time in five seasons, courtesy of a 3-1 win over Birmingham City at St James' Park.